package com.touzbi.hss.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

public class DAOFactory implements AbstractDAOFactory {

	private SessionFactory sessionFactory;

	public DAOFactory(SessionFactory sessionFactory) {
		super();
		this.sessionFactory = sessionFactory;
	}

	@Override
	public AbstractPatientDAO getPatientDAO() {
		return new PatientDAO(this);
	}

	public Session getSession() {
		return this.sessionFactory.getCurrentSession();
	}

	@Override
	public AbstractSoinDAO getSoinDAO() {
		return new SoinDAO(this);
	}
}
